<?php
include_once("../modules/checkA.php");
include_once("../../config.php");
$plate=select_one_line_all_items($table_Prefix."plate","mid = 'access_record'");
?>


<?
//用来判断当前系统属于什么板块
$system_part = $plate['mid'];
include_once("select_datas.php");
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php include_once(ROOT_PATH_.'/controlbase/modules/head.php'); ?>
</head>

<body>

<div id="topbar"><?php include ROOT_PATH_.'/controlbase/modules/topbar.php'; ?></div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controlbase/modules/sidebar.php'; ?>
        </div>


        <div id="content" class="layui-form">
            <h1> 签到记录 </h1>




            <div class="select-box layui-form">
                <form action="detail-list.php" >

<!--                    <div class="layui-form-item">-->
<!--                        <label class="layui-form-label">关键词</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <input type="text" name="select_keywords" placeholder="可搜索车牌，备注" autocomplete="off" class="layui-input" value="--><?// echo $_REQUEST['select_keywords']?><!--" >-->
<!--                        </div>-->
<!--                    </div>-->



<!--                    <div class="layui-form-item">-->
<!--                        <label class="layui-form-label">状态</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <select name="select_status" ><i class="layui-icon"></i>>-->
<!--                                --><?//if($_REQUEST['select_status']){echo "<option value='".$_REQUEST['select_status']."'>".$_REQUEST['select_status']."</option>";}?>
<!--                                <option value="全部">全部</option>-->
<!--                                <option value="正常">正常</option>-->
<!--                                <option value="报废">报废</option>-->
<!--                                <option value="借出">借出</option>-->
<!--                                <option value="维修">维修</option>-->
<!--                            </select>-->
<!--                        </div>-->
<!--                    </div>-->





                    <?
                    $department_list=select_lines_all_items($table_Prefix."department","nid desc","","0");
                    $department=select_one_line_all_items($table_Prefix."department","nid = '".$_REQUEST['select_departmentid']."'");
                    ?>


<!--                    <div class="layui-form-item">-->
<!--                        <label class="layui-form-label">部门</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <select name="select_departmentid" >-->
<!---->
<!--                                --><?//
//                                if(($_REQUEST['select_departmentid']!='全部')and($_REQUEST['select_departmentid']!=""))
//                                {echo "<option value='".$_REQUEST['select_departmentid']."'>".$department['name']."</option>";}
//                                ?>
<!---->
<!---->
<!--                                <option value="全部">全部</option>-->
<!---->
<!---->
<!---->
<!--                                --><?//for($i=0;$i<count($department_list);$i++){?>
<!--                                    <option value="--><?// echo $department_list[$i]['nid'] ?><!--">--><?// echo $department_list[$i]['name'];?><!--</option>-->
<!--                                    --><?// ;} ?>
<!--                            </select>-->
<!--                        </div>-->
<!--                    </div>-->
<!---->
<!--                    <div class="layui-form-item">-->
<!--                        <label class="layui-form-label">驾照类型</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <select name="select_type"  >-->
<!---->
<!--                                --><?//if($_REQUEST['select_type']){echo "<option value='".$_REQUEST['select_type']."'>".$_REQUEST['select_type']."</option>";}?>
<!---->
<!---->
<!--                                <option value="全部">全部</option>-->
<!--                                <option value="营运车">营运车 </option>-->
<!--                                <option value="教练车">教练车 </option>-->
<!---->
<!---->
<!--                            </select>-->
<!--                        </div>-->
<!--                    </div>-->
<!---->




                    <div class="layui-form-item" style="width: 600px;">
                        <label class="layui-form-label">时间</label>

                        <div class="layui-input-block">


<!--                            <div style="float: left; width: 112px; margin-right: 10px;">-->
<!--                                <select name="select_maintain"  >-->
<!---->
<!--                                    --><?// if($_REQUEST['select_maintain']=="jishen") {echo "<option value='".$_REQUEST['select_maintain']."'>季审</option>";}?>
<!--                                    --><?// if($_REQUEST['select_maintain']=="nianshen") {echo "<option value='".$_REQUEST['select_maintain']."'>年审</option>";}?>
<!--                                    --><?// if($_REQUEST['select_maintain']=="qiangbao") {echo "<option value='".$_REQUEST['select_maintain']."'>强保</option>";}?>
<!--                                    --><?// if($_REQUEST['select_maintain']=="quanbao") {echo "<option value='".$_REQUEST['select_maintain']."'>全保</option>";}?>
<!---->
<!---->
<!--                                    <option value="">不选择</option>-->
<!--                                    <option value="jishen" >季审 </option>-->
<!--                                    <option value="nianshen">年审 </option>-->
<!--                                    <option value="qiangbao">强保 </option>-->
<!--                                    <option value="quanbao">全保 </option>-->
<!---->
<!---->
<!--                                </select>-->
<!--                            </div>-->




                            <input type="text" name="select_startday" placeholder="请输入开始时间" autocomplete="off" class="layui-input"  onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" style="float: left; width: 112px" value="<?if($_REQUEST['select_startday']){echo $_REQUEST['select_startday'] ;} ?>" >

                            <span style="float: left;margin: 0 4px; line-height: 30px;">-</span>


                            <input type="text" name="select_endday" placeholder="请输入结束时间" autocomplete="off" class="layui-input" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})"  style="float: left; width:112px" value="<?if($_REQUEST['select_endday']){echo $_REQUEST['select_endday'] ;} ?>"  >


                            <input type="hidden" name="nav-itemed"  value="member" >


                        </div>


                    </div>


                    <br class="clearfloat"/>


                    <button class="layui-btn">查找</button>


                    <br class="clearfloat"/>
                </form>

                <!---->
                <!--    时间段， 排序，分类筛选(注意是relation还是直接字段),-->
                <!---->
                <!---->
                <!--    这边综合字段，搜索字段，然后再selectData中去筛选调整。搜索语句再出结果。-->
                <!--    简单搜索就是直接搜索名字，和排序。-->
                <!--    高级搜索则会出现更多的选项。-->
                <!---->
                <!---->
                <!--    记得还有页码等选项。应该要把页码单独存到pages中。-->
                <br class="clearfloat"/>
            </div>



            <!-- 用$system_part .list_boxes来控制来到确认板块信息显示-->
            <div class="list-box equipment-box">


                <a class="layui-btn" href="collect.php?nav-itemed=access_record">
                    统计信息
                </a>
                <div class="list-boxes">



                    <?php

                    if ($detailnum == 0) {
                        echo "数据添加中";
                    }

                    ?>




                    <table class="layui-table">
                        <colgroup>
                            <col width="60">
                            <col width="110">
                            <col >
                            <col >
                            <col >
                            <col width="280">

                        </colgroup>
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>车牌</th>
                            <th>金额</th>
                            <th>时间</th>
<!--                            <th>季审</th>-->
<!--                            <th>年审</th>-->
<!--                            <th>强保</th>-->
<!--                            <th>全保</th>-->
                            <th>状态</th>
<!--                            <th>违规</th>-->
<!--                            <th>领取人</th>-->

                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>


                        <?php
                        for ($i = 0; $i < $detailnum; $i++) {
                            ?>
                            <tr id="item<?echo $detail[$i]['nid']?>" >
                                <td><?echo $i+1+$plate['page_list_num']*($nowpageid-1) ?></td>
                                <td><?echo $detail[$i]['name']?></td>
                                <td><?echo $detail[$i]['payment']?></td>
<!--                                <td>--><?//echo $detail[$i]['jishen']?><!-- <b class="notice">(--><?//echo count_days(date('Y-m-d'),$detail[$i]['jishen'])?><!--天)</b></td>-->
<!--                                <td>--><?//echo $detail[$i]['nianshen']?><!-- <b class="notice">(--><?//echo count_days(date('Y-m-d'),$detail[$i]['nianshen'])?><!--天)</b></td>-->
<!--                                <td>--><?//echo $detail[$i]['qiangbao']?><!-- <b class="notice">(--><?//echo count_days(date('Y-m-d'),$detail[$i]['qiangbao'])?><!--天)</b></td>-->
<!--                                <td>--><?//echo $detail[$i]['quanbao']?><!-- <b class="notice">(--><?//echo count_days(date('Y-m-d'),$detail[$i]['quanbao'])?><!--天)</b></td>-->

                                <td><?echo $detail[$i]['status']?></td>
                                <td><?echo $detail[$i]['applydate']?></td>
<!--                                <td>-->
<!--                                    --><?// echo sum_total($table_Prefix."ticket","mark","status = '待处理' and equipmentid = '".$detail[$i]['nid']."'")?><!--分 /-->
<!--                                    --><?// echo count_by_item($table_Prefix."ticket","status = '待处理' and equipmentid = '".$detail[$i]['nid']."'")?><!--次-->
<!--                                </td>-->
<!---->
<!--                                --><?// $rental_detail= select_one_line_all_items($table_Prefix."rental","equipmentid = '".$detail[$i]['nid']."' and status = '借出'");
//
//
//
//
//                                $rental_employee= select_one_line_all_items($table_Prefix."employee","nid = '".$rental_detail['borrower']."'");
//                                ?>

<!--                                <td>--><?//echo $rental_employee['name']?><!--</td>-->
                                <!---->
                                <!--        --><?// $department=select_one_line_all_items($table_Prefix."department","nid = '".$detail[$i]['departmentid']."'")?>
                                <!--	  <td>--><?//echo $department['name']?><!--</td>-->
                                <!---->
                                <!---->
                                <td>


                                    <a href="detail-edit.php?nav-itemed=<?echo $system_part?>&nid=<? echo $detail[$i]['nid']?>&nowpageid=<?echo $nowpageid?>" class="layui-btn layui-btn-primary layui-btn-small" >
                                        <i class="layui-icon">&#xe642;</i>修改
                                    </a>


                                    <a href="javascript:void(0)" onclick="delItem (<?php echo $detail[$i]['nid']?>)" class="delete layui-btn layui-btn-primary layui-btn-small" >
                                        <i class="layui-icon">&#xe640;</i>删除</a>





<!--                                    <a href="detail-statistic.php?nav-itemed=equipment&nid=--><?php //echo $detail[$i]['nid'] ?><!--" class="layui-btn layui-btn-primary layui-btn-small">-->
<!--                                        详情-->
<!--                                    </a>-->



<!---->
<!--                                    --><?//if($detail[$i]['status']=="借出"){?>
<!--                                    <a href="--><?//echo $domain?><!--/controlbase/rental/detail-end.php?nid=--><?// echo $detail[$i]['nid']?><!--&nav-itemed=equipment"-->
<!--                                       class="layui-btn layui-btn-primary layui-btn-small">-->
<!--                                            归还-->
<!--                                        </a>--><?//}else{?>
<!--                                        <a href="--><?//echo $domain?><!--/controlbase/rental/detail-add.php?equipmentid=--><?// echo $detail[$i]['nid']?><!--&nav-itemed=equipment&nowpageid=--><?// echo $_GET["nowpageid"] ?><!--"-->
<!--                                           class="layui-btn layui-btn-primary layui-btn-small">-->
<!--                                            领取-->
<!--                                        </a>-->
<!--                                    --><?//}?>
<!---->
<!---->
<!---->
<!---->
<!--                                    --><?//if($detail[$i]['status']!="维修"){?>
<!--                                    <a href="--><?//echo $domain?><!--/controlbase/repair/detail-add.php?equipmentid=--><?// echo $detail[$i]['nid']?><!--&nav-itemed=equipment"-->
<!--                                       class="layui-btn layui-btn-primary layui-btn-small">-->
<!--                                            维修-->
<!--                                        </a>--><?//}else{?>
<!--                                        <a href="--><?//echo $domain?><!--/controlbase/repair/detail-edit.php?equipmentid=--><?// echo $detail[$i]['nid']?><!--&nav-itemed=equipment"-->
<!--                                           class="layui-btn layui-btn-primary layui-btn-small">-->
<!--                                            维修结果-->
<!--                                        </a>-->
<!--                                    --><?//}?>
<!---->




<!--                                    <a href="--><?//echo $domain?><!--/controlbase/ticket/detail-add.php?equipmentid=--><?// echo $detail[$i]['nid']?><!--&nav-itemed=equipment"-->
<!--                                       class="layui-btn layui-btn-primary layui-btn-small">-->
<!--                                        新罚单-->
<!--                                    </a>-->





                                </td>
                            </tr>
                            <?php

                        }
                        ?>


                        </tbody>
                    </table>






                </div>


                <div class="list-box-function" <? if ($detailnum == 0) {
                    echo "style" . "='display:none'";
                } ?> >
                    <div class="page-guide">

                        <?php
                        if ($nowpageid == 1) {
                            ?>
                            <!--现在页数在第一页的时候-->
                            <span>首页</span>
                            <span>前一页</span>
                            <!--现在页数非第一页的时候-->
                            <?php
                        } else {
                            ?>
                            <!--现在页数非第一页的时候-->
                            <a href="detail-list.php?nav-itemed=<?echo $_GET["nav-itemed"]?>&sortby=<?php echo $sort_by; ?>&nid=<?php echo $trans_nid ?>&sys_part=<? echo $system_part ?><?echo $url_str?>">首页</a>
                            <a href="detail-list.php?nav-itemed=<?echo $_GET["nav-itemed"]?>&nowpageid=<?php echo $prepage; ?>&sortby=<?php echo $sort_by; ?>&nid=<?php echo $trans_nid ?>&sys_part=<? echo $system_part ?><?echo $url_str?>">前一页</a>
                            <!--现在页数非第一页的时候-->
                            <?php
                        }
                        ?>


                        <!--开始列印出所有页码-->

                        <?php
                        $ii = 1;
                        $iii = 1;

                        while ($ii <= $page_count) {
                            //首先判断是不是当前页

                            if ($ii == $nowpageid) {
                                echo "<span>" . $ii . "</span>";
                            } else if ((($ii + 5) < $nowpageid) || (($ii - 5) > $nowpageid)) {
                            } else {
                                echo "<a href='";
                                echo "detail-list.php?nowpageid=";
                                echo $iii;
                                echo "&sortby=";
                                echo $sort_by;
                                echo "&nid=";
                                echo $trans_nid;
                                echo "&nav-itemed=";
                                echo $_GET["nav-itemed"];
                                echo "&sys_part=";
                                echo $system_part;
                                echo $url_str;
                                echo "'>";
                                echo $iii;
                                echo "</a>";
                            }

                            $ii++;
                            $iii++;
                        }
                        ?>

                        <!--列印出所有页码 结束-->


                        <?php
                        if ($nowpageid == $page_count) {
                            ?>
                            <!--现在页数在第一页的时候-->
                            <span>后一页</span>
                            <span>末页</span>
                            <!--现在页数非第一页的时候-->
                            <?php
                        } else {
                            ?>
                            <!--现在页数非第一页的时候-->
                            <a href="detail-list.php?nav-itemed=<?echo $_GET["nav-itemed"]?>&nowpageid=<?php echo $nextpage; ?>&sortby=<?php echo $sort_by; ?>&nid=<?php echo $trans_nid ?>&sys_part=<? echo $system_part ?><?echo $url_str?>">后一页</a>
                            <a href="detail-list.php?nav-itemed=<?echo $_GET["nav-itemed"]?>&nowpageid=<?php echo $lastpage; ?>&sortby=<?php echo $sort_by; ?>&nid=<?php echo $trans_nid ?>&sys_part=<? echo $system_part ?><?echo $url_str?>">末页</a>
                            <!--现在页数非第一页的时候-->
                            <?php
                        }
                        ?>


                    </div>
                    <!--翻页代码结束-->
                </div>


                <!--list-box end-->
            </div>

            <!--content端點01-->
        </div>
        <!--maincontent端點01-->
        <br class="clearfloat"/>
    </div>
    <!--container端點01-->
</div>







<!--删除box-->
<?php include '../modules/deletebar.php'; ?>
<!--删除box end-->

<?php include_once('../modules/footer.php'); ?> </body>
</html>